package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SeedsOrigins generated by hbm2java
 */
@Entity
@Table(name="seeds_origins"
    ,catalog="madr_bd10"
)
public class SeedsOrigins  implements java.io.Serializable {


     private Integer idSeeOri;
     private String nameSeeOri;
     private boolean statusSeeOri;
     private Set sowings = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);

    public SeedsOrigins() {
    }

	
    public SeedsOrigins(String nameSeeOri, boolean statusSeeOri) {
        this.nameSeeOri = nameSeeOri;
        this.statusSeeOri = statusSeeOri;
    }
    public SeedsOrigins(String nameSeeOri, boolean statusSeeOri, Set sowings, Set cropsTypeses) {
       this.nameSeeOri = nameSeeOri;
       this.statusSeeOri = statusSeeOri;
       this.sowings = sowings;
       this.cropsTypeses = cropsTypeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_see_ori", unique=true, nullable=false)
    public Integer getIdSeeOri() {
        return this.idSeeOri;
    }
    
    public void setIdSeeOri(Integer idSeeOri) {
        this.idSeeOri = idSeeOri;
    }
    
    @Column(name="name_see_ori", nullable=false, length=45)
    public String getNameSeeOri() {
        return this.nameSeeOri;
    }
    
    public void setNameSeeOri(String nameSeeOri) {
        this.nameSeeOri = nameSeeOri;
    }
    
    @Column(name="status_see_ori", nullable=false)
    public boolean isStatusSeeOri() {
        return this.statusSeeOri;
    }
    
    public void setStatusSeeOri(boolean statusSeeOri) {
        this.statusSeeOri = statusSeeOri;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="seedsOrigins")
    public Set getSowings() {
        return this.sowings;
    }
    
    public void setSowings(Set sowings) {
        this.sowings = sowings;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="seeds_origin_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_seed_ori_see_ori_cro", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_see_ori_cro", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }




}


